import { Module } from '@nestjs/common';
import { OpenApiController } from './open-api.controller';
import { OpenApiService } from './open-api.service';
import { MongooseModule } from '@nestjs/mongoose';
import { OpenApiSchema } from './open-api.schema';
import { TypeOrmModule } from '@nestjs/typeorm';
import { commentsBase, videoBase } from './open-api.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([commentsBase,videoBase]),
    MongooseModule.forFeature([
      {
        name: 'test',
        collection: 'test',
        schema: OpenApiSchema,
      },
    ]),
  ],
  exports: [TypeOrmModule],
  controllers: [OpenApiController],
  providers: [OpenApiService],
})
export class OpenApiModule {}
